//
//  BMAPourLesParentsViewController.m
//  Autismus
//
//  Created by Salhi yacine on 04/12/11.
//  Copyright (c) 2011 EPITECH. All rights reserved.
//

#import "BMAPourLesParentsViewController.h"
#import "BMAGame.h"
#import "BMAAnswer.h"

@implementation BMAPourLesParentsViewController

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
}

-(IBAction)goBack:(id)sender
{
    [self.navigationController popViewControllerAnimated:YES];
}

#pragma mark - View lifecycle

- (void)viewDidLoad
{
    [super viewDidLoad];
    
#if DEBUG
    NSArray *fetchResults = [BMAGame fetchEntities];
    NSLog(@"Fetch");
    for (BMAGame *game in fetchResults)
    {     
        NSLog(@"New Game %@ %@", [game.startDate description], [game.endDate description]);
        for (BMAAnswer *answer in game.answers) {
            NSLog(@"     Question :[%@] ; Start Time : [%@] ; End Time : [%@]", ((answer.value) ? (@"YES") : (@"NO")), [answer.startDate description], [answer.endDate description]);
        }
    }
#endif
}

- (void)viewDidUnload
{
    [super viewDidUnload];
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
	return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}

@end
